import config from '@/config'
import http from '@/utils/request'

export default {
	getPlan: {
		url: `${config.API_URL}/plan/getPlan`,
		name: '获取分货计划',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importStockTurnover: {
		url: `${config.API_URL}/plan/importStockTurnover`,
		name: '库存周转分货导入',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	getPlanByProduct: {
		url: `${config.API_URL}/plan/getPlanByProduct`,
		name: '纯销规模分货',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	adjustAll: {
		url: `${config.API_URL}/plan/adjustAll`,
		name: '调整计划',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	adjustOne: {
		url: `${config.API_URL}/plan/adjustOne`,
		name: '单个额度调整',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	download: {
		url: `${config.API_URL}/plan/download`,
		name: '获取导出的文件ID',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	exportProgress: {
		url: `${config.API_URL}/plan/exportProgress`,
		name: '导出进度',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	progressList: {
		url: `${config.API_URL}/plan/progressList`,
		name: '进度列表',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	areas: {
		url: `${config.API_URL}/plan/areas`,
		name: '获取组织列表',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	productList: {
		url: `${config.API_URL}/plan/productList`,
		name: '产品配置列表',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	// 导入品种单价
	productConfigList:{
		url:`${config.API_URL}/plan/productConfigList`,
		name:"产品列表",
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	growthRateList: {
		url: `${config.API_URL}/plan/growthRateList`,
		name: '增长比例调整',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	stockTurnoverList: {
		url: `${config.API_URL}/plan/stockTurnoverList`,
		name: '库存周转率信息表',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importProductConfig: {
		url: `${config.API_URL}/plan/importProductConfig`,
		name: '导入品种单价',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importTurnover: {
		url: `${config.API_URL}/plan/importTurnover`,
		name: '导入库存周转',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	editGrowthRate: {
		url: `${config.API_URL}/plan/editGrowthRate`,
		name: '增长比率修改',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	batchEditStockTurnover: {
		url: `${config.API_URL}/plan/batchEditStockTurnover`,
		name: '库存周转率批量修改',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	editStockTurnover: {
		url: `${config.API_URL}/plan/editStockTurnover`,
		name: '库存周转率修改',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	countAreaProgress: {
		url: `${config.API_URL}/plan/countAreaProgress`,
		name: '片区进度统计',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	countTypeProgress: {
		url: `${config.API_URL}/plan/countTypeProgress`,
		name: '品种进度统计',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	countSaleProgress: {
		url: `${config.API_URL}/plan/countSaleProgress`,
		name: '片区销售进度统计',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	otcScheduleTime: {
		url: `${config.API_URL}/plan/otcScheduleTime`,
		name: '进度查询日期',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	getPlan2: {
		url: `${config.API_URL}/plan/getPlan`,
		name: '获取分货计划',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importOtxStockTurnover: {
		url: `${config.API_URL}/plan/importOtxStockTurnover`,
		name: '库存周转分货导入',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	areas2: {
		url: `${config.API_URL}/plan/otxAreas`,
		name: '获取组织列表',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	productList2: {
		url: `${config.API_URL}/plan/otxProductList`,
		name: '产品配置列表',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	otxScheduleTime: {
		url: `${config.API_URL}/plan/otxScheduleTime`,
		name: '进度查询日期',
		get: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url, data)
		}
	},
	countOtxSaleProgress: {
		url: `${config.API_URL}/plan/countOtxSaleProgress`,
		name: '片区销售进度统计',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	productConfigList2:{
		url:`${config.API_URL}/plan/productConfigList`,
		name:"产品列表",
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importOtxProductConfig: {
		url: `${config.API_URL}/plan/importOtxProductConfig`,
		name: '导入品种单价',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	otxAdjustAll: {
		url: `${config.API_URL}/plan/otxAdjustAll`,
		name: '调整计划',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	otxAdjustOne: {
		url: `${config.API_URL}/plan/otxAdjustOne`,
		name: '单个额度调整',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
	importOtxTurnover: {
		url: `${config.API_URL}/plan/importOtxTurnover`,
		name: '导入库存周转',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},
}
